package com.zxjbyte.yiyi.framework.common.domain.api;

import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springdoc.api.annotations.ParameterObject;

import java.util.List;

/**
 * @Author zhangxingjia
 * @Date 2023/3/15 16:46
 * @Version: 1.0
 */
@Data
@Schema(description = "分页查询条件")
public class PageQuery {

    public static final int DEFAULT_PAGE_NO = 1;
    public static final int DEFAULT_PAGE_SIZE = 10;
    public static final String PAGE_FIELD_PAGE_NO = "pageNo";
    public static final String PAGE_FIELD_PAGE_SIZE = "pageSize";

    @Parameter(description = "当前页, 默认第一页为1", required = true)
    private Integer pageNo = DEFAULT_PAGE_NO;

    @Parameter(description = "页大小, 默认为10", required = true)
    private Integer pageSize = DEFAULT_PAGE_SIZE;

    @Parameter(hidden = true)
    private List<OrderBy> orders;
}
